package yaliun.base;

import java.util.Calendar;
import org.apache.log4j.*;

public class Today
{
	static Logger log = Logger.getLogger(Today.class);
	
	Calendar cal = Calendar.getInstance();
	
	public int getYear()
	{
		log.debug("getYear");
		return cal.get(cal.YEAR);
	}

	public int getMonth()
	{
		return cal.get(cal.MONTH) + 1;
	}
	
	public int getDate()
	{
		return cal.get(cal.DATE);
	}	
	
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		PropertyConfigurator.configure("conf/log4j.properties");
		Today today = new Today();
		
		log.debug(today.getYear());
		log.debug(today.getMonth());
		log.debug(today.getDate());
	}
	
}
